home *** CD-ROM | disk | FTP | other *** search
/ Champak 109 / Vol 109.iso / games / flash_ch.swf / scripts / frame_11 / DoAction.as
Text File  |  2008-11-12  |  470b  |  25 lines

  1. trace("best: " + bestMove);
  2. delete allPossibleMoves;
  3. trace("time " + (getTimer() - s));
  4. if(bestMove == null)
  5. {
  6.    messages.gotoAndStop("Pat");
  7. }
  8. isPat = checkChessState(SIDE_COMPUTER);
  9. tempP = do_move(bestMove,SIDE_COMPUTER);
  10. isNotMat = checkChessState(SIDE_COMPUTER);
  11. undo_move(bestMove,SIDE_COMPUTER,tempP);
  12. if(isNotMat)
  13. {
  14.    moveRealComputer(bestMove);
  15. }
  16. else if(isPat)
  17. {
  18.    messages.gotoAndStop("Pat");
  19. }
  20. else
  21. {
  22.    computerLoose();
  23. }
  24. stop();
  25.